<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('施工人员打卡')" />
    <th:block th:include="include :: datetimepicker-css" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <style>
    	.submitBtn{
			display:block;margin:10px auto;
			width:50%;
			height:40px;
		}
		.submitBtn i{
			margin-right:3px;
			margin-left:-5px
		}
    </style>
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-check-add">
        	<input name="id" type="hidden" th:field="${kqproject.id}">
        	<div class="form-group">    
                <label class="col-sm-12 control-label ">项目名称：<span th:text="${kqproject.name}"></span></label>
            </div>
            <div class="form-group">    
                <label class="col-sm-12 control-label ">项目地址：<span th:text="${kqproject.adress}"></span></label>
            </div>
            <div class="form-group">  
            	<label class="col-sm-12 control-label ">项目经理：<span th:text="${kqproject.projectManager}"></span></label>
            </div>
            <div class="form-group">  
            	<label class="col-sm-12 control-label is-required">手机号：<input name="phone" class="form-control" type="text" required></label>
            </div>
        </form>
    </div>
    <div class="row">
        <div class="col-sm-12">
          	<button type="button" class="btn btn-sm btn-primary submitBtn" onclick="submitHandler()">
          	<i class="fa fa-check"></i>打 卡
          	</button>&nbsp;
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script th:inline="javascript">
        var prefix = ctx + "api"
        $("#form-check-add").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/checkaddSave", $('#form-check-add').serialize(), function(){
                    location.href = ctx + 'syssuccess';
                });
            }
        }

    </script>
</body>
</html>